import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import { store, key } from "./store";
// 全局注册组件
import globalComponents from "@/components/index";
// 全局指令
import { setupGlobDirectives } from "@/directives";
// permission control
import "@/permission";

import Antd from "ant-design-vue";
import "ant-design-vue/dist/antd.css";
import "@/styles/index.scss";
import mitt from "mitt";

const app = createApp(App);
app.config.productionTip = false;

app.use(router).use(store, key).use(globalComponents).use(Antd);
app.config.globalProperties.mittBus = mitt();
// Register global directive
setupGlobDirectives(app);
app.mount("#app");
